package org.luxor.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.core.validator.group.UpdateGroup;

import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * 用户数据权限管理表
 *
 * @author Mark @date 2020-07-28 14:29:25
 */
@Data
@TableName("tb_sys_user_manage")
@ApiModel(description = "用户数据权限管理表")
public class SysUserManageEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键Id")
	@NotNull(message = "id，不能为空", groups = UpdateGroup.class)
	private Long id;

	@ApiModelProperty(value = "租户ID")
	private Long tenantId;

	@ApiModelProperty(value = "用户ID")
	@NotNull(message = "userId，不能为空")
	private Long userId;

	@ApiModelProperty(value = "组织部门ID")
	@NotNull(message = "deptId，不能为空")
	private Long deptId;

	@ApiModelProperty(value = "读写权限 0为只读，1为读写")
	private Byte rwAccess;

	@ApiModelProperty(value = "是否启动(1-启用；0-禁用)")
	private Boolean enabled;

	@ApiModelProperty(value = "逻辑删除(1-删除；0-未删除)")
	private Boolean deleted;

}
